
<script>
    $(document).ready(function() {
        $("#UserLoginForm").bind("submit", function()
        {
            $.ajax({
                url: "http://localhost:26/ecomerce/users/login",
                type: "POST", 
                dataType: 'Jsonp',
                jsonpCallback: 'login',
                data: $("#UserLoginForm").serialize()
            });
          
        });
    });
   
</script>
<form id="UserLoginForm" method="post" accept-charset="utf-8">
    <input name="data[User][username]" type="text" id="UserUsername">
    <input name="data[User][password]" type="password" id="UserPassword">
    <input  type="submit" value="submit">

</form>
